import request from '../utils/axios'

// 登录拿token
export function Login(data: P.Login) {
  return request.post({
    url: '/sys/auth/login',
    method: 'post',
    data
  })
}

// 获取用户信息
export function getUserInfo(orgId: number | '') {
  return request.get({
    url: '/sys/user/info',
    method: 'get',
    data: {
      orgId
    }
  })
}

// 获取menu
export function getMenuList(platformId: number) {
  return request.get({
    url: '/sys/menu/nav',
    method: 'get',
    data: {
      platformId: platformId
    }
  })
}

// 获取权限列表
export function getPermissionList() {
  return request.get({
    url: '/sys/menu/authority',
    method: 'get'
  })
}
